package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.QuestionBankMapper;
import com.ruoyi.system.domain.QuestionBank;
import com.ruoyi.system.service.IQuestionBankService;

/**
 * 题库的查询Service业务层处理
 * 
 * @author lsc
 * @date 2025-03-06
 */
@Service
public class QuestionBankServiceImpl implements IQuestionBankService 
{
    @Autowired
    private QuestionBankMapper questionBankMapper;

    /**
     * 查询题库的查询
     * 
     * @param id 题库的查询主键
     * @return 题库的查询
     */
    @Override
    public QuestionBank selectQuestionBankById(Long id)
    {
        return questionBankMapper.selectQuestionBankById(id);
    }

    /**
     * 查询题库的查询列表
     * 
     * @param questionBank 题库的查询
     * @return 题库的查询
     */
    @Override
    public List<QuestionBank> selectQuestionBankList(QuestionBank questionBank)
    {
        List<QuestionBank> questionBanks = questionBankMapper.selectQuestionBankList(questionBank);
        System.out.println(questionBanks);
        return questionBanks;
    }

    /**
     * 新增题库的查询
     * 
     * @param questionBank 题库的查询
     * @return 结果
     */
    @Override
    public int insertQuestionBank(QuestionBank questionBank)
    {
        return questionBankMapper.insertQuestionBank(questionBank);
    }

    /**
     * 修改题库的查询
     * 
     * @param questionBank 题库的查询
     * @return 结果
     */
    @Override
    public int updateQuestionBank(QuestionBank questionBank)
    {
        return questionBankMapper.updateQuestionBank(questionBank);
    }

    /**
     * 批量删除题库的查询
     * 
     * @param ids 需要删除的题库的查询主键
     * @return 结果
     */
    @Override
    public int deleteQuestionBankByIds(Long[] ids)
    {
        return questionBankMapper.deleteQuestionBankByIds(ids);
    }

    /**
     * 删除题库的查询信息
     * 
     * @param id 题库的查询主键
     * @return 结果
     */
    @Override
    public int deleteQuestionBankById(Long id)
    {
        return questionBankMapper.deleteQuestionBankById(id);
    }
}
